package cn.com.connext.scrm.repository.master;


import cn.com.connext.scrm.domain.master.DwaQuestionRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface DwaQuestionRecordRepository extends JpaRepository<DwaQuestionRecord, Long>, JpaSpecificationExecutor {
    @Query(value ="select * from  dwa_question_record d where unionId = :unionId order by question_id desc limit 1",nativeQuery = true)
    DwaQuestionRecord findQuestionByUnionId(@Param("unionId") String unionId);
}
